<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>NFDFlightDataTimerTask 执行方法分析</title>
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        body {
            background-color: #f5f7f9;
            color: #333;
            line-height: 1.6;
            padding: 20px;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            border-radius: 10px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }
        header {
            background: linear-gradient(135deg, #2c3e50, #4a6491);
            color: white;
            padding: 30px 20px;
            text-align: center;
        }
        h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
        }
        .subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
        }
        .content {
            padding: 30px;
        }
        .section {
            margin-bottom: 40px;
            border-left: 4px solid #4a6491;
            padding-left: 20px;
        }
        h2 {
            color: #2c3e50;
            margin-bottom: 15px;
            font-size: 1.8rem;
        }
        h3 {
            color: #3498db;
            margin-bottom: 10px;
            font-size: 1.4rem;
        }
        .card-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }
        .card {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
            transition: transform 0.3s ease;
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
        }
        .card h4 {
            color: #2c3e50;
            border-bottom: 2px solid #3498db;
            padding-bottom: 10px;
            margin-bottom: 15px;
        }
        .time-slot {
            background: #e8f4fc;
            padding: 8px 12px;
            border-radius: 4px;
            font-family: monospace;
            display: inline-block;
            margin: 5px 0;
        }
        .info-box {
            background: #e8f4fc;
            border-radius: 8px;
            padding: 20px;
            margin: 20px 0;
        }
        .method-list {
            margin-left: 20px;
            margin-bottom: 15px;
        }
        .method-item {
            padding: 8px 0;
            border-bottom: 1px dashed #ddd;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        th, td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }
        th {
            background-color: #4a6491;
            color: white;
        }
        tr:hover {
            background-color: #f5f5f5;
        }
        .conclusion {
            background: #2c3e50;
            color: white;
            padding: 30px;
            border-radius: 8px;
            margin-top: 30px;
        }
        footer {
            text-align: center;
            padding: 20px;
            color: #7f8c8d;
            font-size: 0.9rem;
        }
        .time-grid {
            display: grid;
            grid-template-columns: repeat(24, 1fr);
            gap: 2px;
            margin: 20px 0;
        }
        .hour-cell {
            background: #f0f7ff;
            border: 1px solid #cce5ff;
            padding: 5px;
            text-align: center;
            font-size: 0.8rem;
        }
        .active-cell {
            background: #4caf50;
            color: white;
        }
        .system-cell {
            background: #ff9800;
            color: white;
        }
        .data-cell {
            background: #9c27b0;
            color: white;
        }
        .legend {
            display: flex;
            gap: 15px;
            margin: 15px 0;
        }
        .legend-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .legend-color {
            width: 15px;
            height: 15px;
            border-radius: 3px;
        }
        @media (max-width: 768px) {
            .card-container {
                grid-template-columns: 1fr;
            }
            .time-grid {
                grid-template-columns: repeat(12, 1fr);
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>NFDFlightDataTimerTask 执行方法分析</h1>
            <p class="subtitle">定时任务执行方法与调度时间分析</p>
        </header>

        <div class="content">
            <div class="section">
                <h2>定时任务概述</h2>
                <p>NFDFlightDataTimerTask 是一个基于 Java TimerTask 的定时任务类，包含了多个在不同时间点执行的业务方法。</p>
                
                <div class="info-box">
                    <h3>执行频率</h3>
                    <p>该定时任务每分钟执行一次，但内部方法根据具体时间条件判断是否执行。</p>
                    <p>主要执行时间点：每小时的第00分钟和第30分钟，以及其他特定时间点。</p>
                </div>
            </div>

            <div class="section">
                <h2>执行时间分布</h2>
                
                <div class="legend">
                    <div class="legend-item">
                        <div class="legend-color" style="background: #4caf50;"></div>
                        <span>业务处理</span>
                    </div>
                    <div class="legend-item">
                        <div class="legend-color" style="background: #ff9800;"></div>
                        <span>系统维护</span>
                    </div>
                    <div class="legend-item">
                        <div class="legend-color" style="background: #9c27b0;"></div>
                        <span>数据同步</span>
                    </div>
                </div>
                
                <div class="time-grid">
                    <div class="hour-cell">0</div><div class="hour-cell">1</div><div class="hour-cell">2</div>
                    <div class="hour-cell">3</div><div class="hour-cell">4</div><div class="hour-cell">5</div>
                    <div class="hour-cell">6</div><div class="hour-cell active-cell">7</div><div class="hour-cell active-cell">8</div>
                    <div class="hour-cell active-cell">9</div><div class="hour-cell active-cell">10</div><div class="hour-cell active-cell">11</div>
                    <div class="hour-cell active-cell">12</div><div class="hour-cell active-cell">13</div><div class="hour-cell active-cell">14</div>
                    <div class="hour-cell active-cell">15</div><div class="hour-cell active-system">16</div><div class="hour-cell active-system">17</div>
                    <div class="hour-cell">18</div><div class="hour-cell">19</div><div class="hour-cell">20</div>
                    <div class="hour-cell system-cell">21</div><div class="hour-cell data-cell">22</div><div class="hour-cell system-cell">23</div>
                </div>
                
                <p>从上图可以看出，定时任务在白天工作时间（7-17点）较为活跃，晚上主要是数据备份和系统维护任务。</p>
            </div>

            <div class="section">
                <h2>主要执行的方法</h2>
                
                <h3>按时间点分类的方法</h3>
                
                <div class="card-container">
                    <div class="card">
                        <h4>07:00 / 07:30</h4>
                        <div class="method-list">
                            <div class="method-item">OA生管欠料出货.tttt()</div>
                            <div class="method-item">PinBao_WaiXiao.yunxing()</div>
                            <div class="method-item">T100pandian.pandian()</div>
                            <div class="method-item">T100pandian.pandian_ZSP()</div>
                        </div>
                    </div>
                    
                    <div class="card">
                        <h4>08:00 时段</h4>
                        <div class="method-list">
                            <div class="method-item">CreateExcel_T100_Other.gogogo()</div>
                            <div class="method-item">ExportPdfUtil_CaiGou.send_caigou_pdf()</div>
                            <div class="method-item">ExportPdfUtil_CaiGou_TuoGongDan_ZH00.send_caigou_pdf()</div>
                            <div class="method-item">Create_FX_workflow_T100.go()</div>
                            <div class="method-item">Create_FX_workflow_Sunlike.go()</div>
                            <div class="method-item">WPFX_PDF.go()</div>
                        </div>
                    </div>
                    
                    <div class="card">
                        <h4>08:30 时段</h4>
                        <div class="method-list">
                            <div class="method-item">CreateExcel_T100.gogogo()</div>
                            <div class="method-item">多种ECR相关PDF导出方法</div>
                            <div class="method-item">ZH_TB.gogogo() (角色同步)</div>
                        </div>
                    </div>
                </div>
                
                <h3>其他重要时段</h3>
                
                <div class="card-container">
                    <div class="card">
                        <h4>10:30 / 18:30</h4>
                        <div class="method-list">
                            <div class="method-item">ExportPdfUtil_CaiGou_WeiJiao.yunxing()</div>
                        </div>
                    </div>
                    
                    <div class="card">
                        <h4>22:00 - 23:30</h4>
                        <div class="method-list">
                            <div class="method-item">多种数据统计和备份方法</div>
                            <div class="method-item">天心样品承认每日统计数量</div>
                            <div class="method-item">T100样品承认每日统计数量</div>
                            <div class="method-item">OA样品承认每日统计数量</div>
                        </div>
                    </div>
                    
                    <div class="card">
                        <h4>23:30 / 23:50</h4>
                        <div class="method-list">
                            <div class="method-item">PMS_TB相关方法</div>
                            <div class="method-item">ZHHR_TB.go()</div>
                            <div class="method-item">Gongzi_Close.go()</div>
                            <div class="method-item">Mes_Close.go()</div>
                            <div class="method-item">ChuLi_LJ_DaiBan.yunxing()</div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="section">
                <h2>数据库操作</h2>
                <p>定时任务中执行了多种数据库操作，主要通过MyBatis SqlSession执行：</p>
                
                <table>
                    <thead>
                        <tr>
                            <th>操作类型</th>
                            <th>Mapper方法</th>
                            <th>描述</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>查询</td>
                            <td>ecologyMapper.每日承认记录是否插入完成</td>
                            <td>检查每日承认记录是否已完成</td>
                        </tr>
                        <tr>
                            <td>插入</td>
                            <td>sunlikeMapper.天心请购未定价统计记录生成</td>
                            <td>生成天心请购未定价统计记录</td>
                        </tr>
                        <tr>
                            <td>插入</td>
                            <td>t100Mapper.珠海当日交期统计记录生成</td>
                            <td>生成珠海当日交期统计记录</td>
                        </tr>
                        <tr>
                            <td>插入/更新</td>
                            <td>t100Mapper.珠海当日缺料统计记录生成</td>
                            <td>生成并更新珠海当日缺料统计记录</td>
                        </tr>
                        <tr>
                            <td>插入</td>
                            <td>ecologyMapper.珠海当日飞书OA数据生成</td>
                            <td>生成珠海当日飞书OA数据</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="section">
                <h2>错误处理与邮件通知</h2>
                <p>定时任务包含了完善的错误处理机制，关键任务失败时会发送邮件通知：</p>
                
                <div class="info-box">
                    <h4>邮件通知机制</h4>
                    <p>使用EmailManager类发送错误通知邮件到：1311385318@qq.com</p>
                    <p>监控的任务包括：T100盘点任务、物品放行单生成、数据同步任务等</p>
                </div>
            </div>

            <div class="conclusion">
                <h2>执行方法总结</h2>
                <p>NFDFlightDataTimerTask 执行了以下主要类别的方法：</p>
                <ol>
                    <li><strong>数据导出方法</strong> - 多种PDF导出功能（ECR、采购单等）</li>
                    <li><strong>数据同步方法</strong> - 组织架构、角色、人员数据同步</li>
                    <li><strong>统计备份方法</strong> - 每日数据统计和备份</li>
                    <li><strong>系统维护方法</strong> - 清理垃圾数据、关闭账号等</li>
                    <li><strong>业务处理方法</strong> - 生产相关的业务逻辑处理</li>
                </ol>
                <p>这些方法覆盖了企业的多个业务领域，包括生产管理、采购管理、人力资源管理和系统维护等。</p>
            </div>
        </div>

        <footer>
            <p>NFDFlightDataTimerTask 执行方法分析 | 基于提供的Java代码</p>
        </footer>
    </div>

    <script>
        // 时间点高亮显示
        document.addEventListener('DOMContentLoaded', function() {
            const now = new Date();
            const hours = now.getHours();
            
            const hourCells = document.querySelectorAll('.hour-cell');
            if (hourCells.length > hours) {
                hourCells[hours].style.border = '2px solid #e74c3c';
                hourCells[hours].style.fontWeight = 'bold';
            }
        });
    </script>
</body>
</html>